struct Vector{
	float x;
	float y;
	float z;
	bool cleanFloats();
};

struct Triangle{
	Vector v1;
	Vector v2;
	Vector v3;
};

struct Plane{
	float a;
	float b;
	float c;
	float d;
	Vector normal;
	bool front_facing_to(Vector &v);
	float signed_dist_to(Vector &point);
};



Vector VectorScale(const Vector &v1, Vector &v2);
Vector VectorScale(Vector &v1, const Vector &v2);
Vector VectorScale(Vector &v1, Vector &v2);
Vector VectorSubtraction(Vector *v1, Vector *v2);
Vector VectorSubtraction(const Vector *v1, const Vector *v2);
float Matrix3DotProduct(const Vector *v1, Vector *v2);
float Matrix3DotProduct(Vector *v1, Vector *v2);
float Matrix3DotProduct(const Vector* v1, const Vector* v2);
Vector VectorAddition(Vector *v1, Vector *v2);
Vector VectorAddition(const Vector *v1, const Vector *v2);
Vector VectorMultiplication(Vector *v1, float multiplier);
Vector VectorMultiplication(const Vector *v1, float multiplier);
Vector VectorNegate(Vector *v1);
Vector Matrix3CrossProduct(Vector *v1, Vector *v2);
Vector Matrix3CrossProduct(const Vector *v1, Vector *v2);
void Normalize(Vector *v, Vector *vectorOut);
Vector VectorComputeNormal(const Vector *v1,const Vector *v2,const Vector *v3);
Vector VectorComputeNormal(Vector *v1, Vector *v2,Vector *v3);
void InsertQuadToTriangleList(Vector *v1, Vector *v2, Vector *v3, Vector *v4);
float VectorLength(Vector &v1);
float VectorLength(const Vector &v1);
Plane VectorsToPlane(const Vector *v1, const Vector *v2,const Vector *v3);
Plane VectorsToPlane(Vector *v1, Vector *v2, Vector *v3);
bool equals(float a, float b);
bool lowest_root (float a, float b, float c, float max_r, float& root);
void clamp(float& val, float min, float max);